Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Add hello world command to demo bundle and configure new log to console handler #557

Merged
merged 4 commits into from
Jun 14, 2013
Merged

Add hello world command to demo bundle and configure new log to console handler #557

merged 4 commits into from
Jun 14, 2013

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented Jun 5, 2013

First commit: allows the master branch to install 2.4-dev.
Second commit: added a hello world command in demo bundle
Third commit: configure the log to console handler that is possible since symfony/monolog-bundle#42

level: debug
console:
type: console
bubble: false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this increases performance so the firephp and chromephp handler are not executed for console commands

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the meaning of "bubble" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello.

I just hit an issue here with bubble and I would like to discuss about it

I was trying to debug my application, and so I added a new handler to push all my logs to the Elasticsearch/Heka/Kibana stack (to get a better visualisation / filter system for my logs...) . I did not really think about the order of the handlers and so I added my new handler after the previous handlers. And so I ended-up with the following config:

monolog:
    handlers:
        main:
            type:   stream
            path:   "%kernel.logs_dir%/%kernel.environment%.log"
            level:  debug
            channels: ["!event", "!consumer_status", "!beberlei_metrics"]
        console:
            type:   console
            bubble: false
            channels: ["!doctrine", "!event", "!consumer_status", "!beberlei_metrics"]
        heka:
            type: socket
            level:  debug
            connection_string: "udp://heka.lxc:5565"
            timeout: 1
            connection_timeout: 1
            formatter: monolog.formatter.json

After that, I tried to debug my code and noticed I missed lot of logs. I try to understand why (is it an issue with ES or heka or kibana ? ; It is an issue with my code ? ; etc ?). And I finally understood my issue.

So finally, I really think the console handler should bubble all logs, because It's "just" a nice to have feature (A very good one BTW, thanks again). But it should not "eat" logs. All handlers registered after the handler should also be able to get all logs. So, IMHO, we should turn on the bubble here.

WDTY ?

ping @Tobion @Seldaek

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesnt really matter if bubble is enabled or not as the firephp and chromephp handler are not enabled anymore by default in SE.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tobion Yes I know and my "issue" was not about firephp. It was about DX ; to remove a possible WTF effect.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to change it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already changed it in my app ; But I wanted to know if you think it's a good idea to change it in symfony too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok to change it

@Tobion
Copy link
Contributor Author

Tobion commented Jun 9, 2013

@fabpot could you merge it? I wanna write about that.

fabpot added a commit that referenced this pull request Jun 14, 2013
This PR was merged into the master branch.

Discussion
----------

Add hello world command to demo bundle and configure new log to console handler

First commit: allows the master branch to install 2.4-dev.
Second commit: added a hello world command in demo bundle
Third commit: configure the log to console handler that is possible since symfony/monolog-bundle#42

Commits
-------

0cafa50 also allow doctrine 2.4 to be installed
b47328a configure the log to console handler
7baa790 added a hello world command in demo bundle
8a246dc allow master branch to install 2.4-dev
@fabpot fabpot merged commit 0cafa50 into symfony:master Jun 14, 2013
@Tobion Tobion deleted the allow-dev-2.4 branch June 14, 2013 12:11
lyrixx added a commit to lyrixx/symfony-standard that referenced this pull request Feb 5, 2016
fabpot added a commit that referenced this pull request Feb 5, 2016
This PR was merged into the 2.7 branch.

Discussion
----------

[Monolog] Console handler don't bubble anymore

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

see #557 (comment) for more information

Commits
-------

8fb1e81 [Monolog] Console handler don't bubble anymore
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants